import java.util.Scanner;

public class dateCalculation {
    public static int[] monthlyDays = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
    public static void main(String[] args) {
        System.out.println("请输入一个日期,格式 yyyy-MM-dd");
        Scanner sc = new Scanner(System.in);
        String date = sc.next();
        String[] split = date.split("-");
        int year = Integer.parseInt(split[0]);
        int month = Integer.parseInt(split[1]);
        int day = Integer.parseInt(split[2]);

        day++;
        //针对闰年修改日数
        if (isLeapYear(year) && month == 2) {
            monthlyDays[1] = 29;
        }
        if (day > monthlyDays[month - 1]) {
            day = 1;
            month++;
            if (month > 12) {
                month = 1;
                year++;
            }
        }
        System.out.println("下一天的日期是："+year + "-" + month + "-" + day);
    }

    public static boolean isLeapYear(int year) {
        return (year % 4 == 0 && year % 100 != 0) || year % 400 == 0;
    }
}
